<?php
// requirement : If sometime calculation goes wrong , but we don't require to show
// negative sign

$num = -23.55;
echo abs($num);
echo "<br>";
echo round($num);
echo "<br>";
echo round($num,1);
echo "<br>";
echo ceil($num);
echo "<br>";
echo floor($num);


echo round(96, 10, PHP_ROUND_HALF_UP);   // 10
echo round(9.5, 0, PHP_ROUND_HALF_DOWN); // 9
echo round(9.5, 0, PHP_ROUND_HALF_EVEN); // 10
echo round(9.5, 0, PHP_ROUND_HALF_ODD);  // 9

echo round(8.5, 0, PHP_ROUND_HALF_UP);   // 9
echo round(8.5, 0, PHP_ROUND_HALF_DOWN); // 8
echo round(8.5, 0, PHP_ROUND_HALF_EVEN); // 8
echo round(8.5, 0, PHP_ROUND_HALF_ODD);  // 9
